/**
 * <p>Title: Comments.java</p>
 * <p>Description: DoNotes</p>
 * @author WangJun
 * @date 2009/11/25 11:01:58
 * @version 1.0
 */
package net.donotes.blog.pojo;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Text;

/**
 * @author WangJun
 *
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Comment {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
    @Persistent
	private Long postId;
    @Persistent
	private Text content;
    @Persistent
	private String authorName;
    @Persistent
	private String authorMail;
    @Persistent
	private String authorUrl;
    @Persistent
	private String authorGravatar;
    @Persistent
	private String authorIp;
    @Persistent
    private short type;
    @Persistent
	private Date createDate;
    @Persistent
	private short status;

    /**
     * Constructors
     */
    public Comment() {
    	
    }
    
    /**
     * Constructors
     * 
     * @param postId
     * @param content
     * @param authorName
     * @param authorMail
     * @param authorUrl
     * @param authorGravatar
     * @param authorIp
     * @param type
     * @param createDate
     * @param updateDate
     * @param status
     */
    public Comment(Long postId, Text content, String authorName, 
					String authorMail, String authorUrl, String authorGravatar, String authorIp, short type, 
					Date createDate, short status) {
		this.postId = postId;
		this.content = content;
		this.authorName = authorName;
		this.authorMail = authorMail;
		this.authorUrl = authorUrl;
		this.authorGravatar = authorGravatar;
		this.authorIp = authorIp;
		this.type = type;
		this.createDate = createDate;
		this.status = status;
    }
    
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the postId
	 */
	public Long getPostId() {
		return postId;
	}

	/**
	 * @param postId the postId to set
	 */
	public void setPostId(Long postId) {
		this.postId = postId;
	}

	/**
	 * @return the content
	 */
	public Text getContent() {
		return content;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(Text content) {
		this.content = content;
	}

	/**
	 * @return the authorName
	 */
	public String getAuthorName() {
		return authorName;
	}

	/**
	 * @param authorName the authorName to set
	 */
	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	/**
	 * @return the authorMail
	 */
	public String getAuthorMail() {
		return authorMail;
	}

	/**
	 * @param authorMail the authorMail to set
	 */
	public void setAuthorMail(String authorMail) {
		this.authorMail = authorMail;
	}

	/**
	 * @return the authorUrl
	 */
	public String getAuthorUrl() {
		return authorUrl;
	}

	/**
	 * @param authorUrl the authorUrl to set
	 */
	public void setAuthorUrl(String authorUrl) {
		this.authorUrl = authorUrl;
	}
	
	/**
	 * @return the authorGravatar
	 */
	public String getAuthorGravatar() {
		return authorGravatar;
	}

	/**
	 * @param authorGravatar the authorGravatar to set
	 */
	public void setAuthorGravatar(String authorGravatar) {
		this.authorGravatar = authorGravatar;
	}

	/**
	 * @return the authorIp
	 */
	public String getAuthorIp() {
		return authorIp;
	}

	/**
	 * @param authorIp the authorIp to set
	 */
	public void setAuthorIp(String authorIp) {
		this.authorIp = authorIp;
	}

	/**
	 * @return the type
	 */
	public short getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(short type) {
		this.type = type;
	}

	/**
	 * @return the createDate
	 */
	public Date getCreateDate() {
		return createDate;
	}

	/**
	 * @param createDate the createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * @return the status
	 */
	public short getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(short status) {
		this.status = status;
	}
}